package project.teg.games.game.pinch;

import project.teg.common.types.ScreenType;
import project.teg.configuration.Gestures;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PointF;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;

public class GameView extends View {

	public ScreenType currentScreen = ScreenType.WelcomeScreen;
	public InteractiveObject interactiveObject;

	public GameView(Context context) {
		super(context);
	}

	public GameView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	int br = 1;

	@Override
	protected synchronized void onDraw(Canvas canvas) {
		if (interactiveObject == null)
			interactiveObject = new InteractiveObject();
		int color;
		if (currentScreen == ScreenType.WelcomeScreen) {
			color = Color.BLUE;
			canvas.drawColor(color);
		} else if (currentScreen == ScreenType.NextLevel) {
			color = Color.LTGRAY;
			canvas.drawColor(color);
			interactiveObject.renderObject(canvas);
			if (interactiveObject != null)
				interactiveObject.renderObject(canvas);
		}

		else {
			color = Color.RED;
			canvas.drawColor(color);
		}

	}

}